package com.cmcc.cmii.cmiiservicemanagement.config;

import com.alibaba.nacos.api.exception.NacosException;
import com.alibaba.nacos.api.naming.pojo.Instance;

/**
 * @author Thanks
 */
public interface ServiceDiscoveryClient {

    /**
     * register instance
     *
     * @param applicationName applicationName
     * @param ip              ip
     * @param port            port
     */
    void registerInstance(String applicationName, String ip, Integer port);


    /**
     *
     * @param serviceName
     * @param groupName
     * @param ip
     * @param port
     */
    void registerInstance(String serviceName, String groupName, String ip, int port);

    /**
     *
     * @param serviceName
     * @param ip
     * @param port
     * @param clusterName
     */
    void registerInstance(String serviceName, String ip, int port, String clusterName);

    /**
     *
     * @param serviceName
     * @param groupName
     * @param ip
     * @param port
     * @param clusterName
     */
    void registerInstance(String serviceName, String groupName, String ip, int port, String clusterName);

    /**
     *
     * @param serviceName
     * @param instance
     * @throws NacosException
     */
    void registerInstance(String serviceName, Instance instance);

    void registerInstance(String serviceName, String groupName, Instance instance);
    /**
     * deregister instance
     *
     * @param applicationName applicationName
     * @param ip              ip
     * @param port            port
     */
    void deregisterInstance(String applicationName, String ip, Integer port);

    /**
     *
     * @param serviceName
     * @param groupName
     * @param ip
     * @param port
     */
    void deregisterInstance(String serviceName, String groupName, String ip, int port);

    /**
     *
     * @param serviceName
     * @param ip
     * @param port
     * @param clusterName
     */
    void deregisterInstance(String serviceName, String ip, int port, String clusterName);

    /**
     *
     * @param serviceName
     * @param groupName
     * @param ip
     * @param port
     * @param clusterName
     */
    void deregisterInstance(String serviceName, String groupName, String ip, int port, String clusterName);


}
